package com.ae.shield.generator.builder.recipes.assembly;

import net.minecraft.data.IFinishedRecipe;
import net.minecraft.util.IItemProvider;
import net.minecraft.util.ResourceLocation;

import java.util.function.Consumer;

public class NormalAssemblyRecipeBuilder extends AssemblyRecipeBuilder<NormalAssemblyRecipeBuilder>{
    public NormalAssemblyRecipeBuilder(IItemProvider result, int count) {
        super(result, count);
    }

    public static NormalAssemblyRecipeBuilder recipe(IItemProvider resultIn) {
        return new NormalAssemblyRecipeBuilder(resultIn, 1);
    }

    public static NormalAssemblyRecipeBuilder recipe(IItemProvider resultIn, int countIn) {
        return new NormalAssemblyRecipeBuilder(resultIn, countIn);
    }

    @Override
    public void build(Consumer<IFinishedRecipe> consumer, ResourceLocation id) {
        id = new ResourceLocation(id.getNamespace(), "normal/" + id.getPath());
        super.build(consumer, id);
    }

    @Override
    public IFinishedRecipe getResult(ResourceLocation id) {
        return new Result(id, result, count, group == null ? "" : group, backing, ingredients, fluid, fluidTag, fluidCount, energy, tick, advancementBuilder);
    }
}
